#include <iostream>

class test{

public:
    test(){
        std::cout<<"构造函数"<<std::endl;
    }
    // test(const test& t){
    //     std::cout<<"拷贝构造"<<std::endl;
    // }
    ~test(){
        std::cout<<"析构函数"<<std::endl;
    }
    void show(){
        std::cout<<"输出"<<std::endl;
    }fff
};

class smartPoint{//智能指针
public:
    smartPoint(test *t):t(t){}
    ~smartPoint(){
        delete t;
    }
    test* operator->(){
        return t;
    }
    test& operator*(){
        return *t;
    }
private:
    test *t;
};

int main(){
    smartPoint p(new test);//内存托管
    p->show();//->重载
    test t=*p;//拷贝构造
    return 0;
}